package umacis.lwuitcomponent.property.controller;



import java.util.Vector;

import com.sun.lwuit.Button;
import com.sun.lwuit.Component;
import com.sun.lwuit.Image;
import com.sun.lwuit.Label;
import com.sun.lwuit.geom.Dimension;
import com.sun.lwuit.plaf.Style;

public class ButtonPropertyController extends PropertyController {

	public ButtonPropertyController(Vector components, Vector parents) {
		name = "Button";
		propertyGetterSetter = new PropertyGetterSetter[3];
		int i = 0;
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setPressedIcon") {	
			public void set(Component cmp, Parameters parameters) {			((Button)cmp).setPressedIcon((Image)parameters.object);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Button)cmp).getPressedIcon()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setRolloverIcon") {	
			public void set(Component cmp, Parameters parameters) {			((Button)cmp).setRolloverIcon((Image)parameters.object);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Button)cmp).getRolloverIcon()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setPressedStyle") {	
			public void set(Component cmp, Parameters parameters) {			((Button)cmp).setPressedStyle((Style)parameters.object);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Button)cmp).getPressedStyle()						);} };
			

		set(components, parents);
		new RadioButtonPropertyController(components, parents);
		new CheckBoxPropertyController(components, parents);
		parents.removeElement(this);
		
	}	

}
